package com.question.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.achievement.entity.Subject;
import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="t_explanation")
public class Explanation {
	private Long id;
	private String num;
	private String title;
	private Subject subject;
	private Options reference;
	private boolean compreh;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public String getNum() {
		return num;
	}
	@Column(length=6000)
	public String getTitle() {
		return title;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	public Subject getSubject() {
		return subject;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
	public Options getReference() {
		return reference;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setNum(String num) {
		this.num = num;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	public void setReference(Options reference) {
		this.reference = reference;
	}
	public boolean isCompreh() {
		return compreh;
	}
	public void setCompreh(boolean compreh) {
		this.compreh = compreh;
	}
	
}
